package com.pentalog.webservice;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.pentalog.bo.TransactionBo;
 
@Component
@Path("/service")
public class PaymentService {
 
	@Autowired
	TransactionBo transactionBo;
	
	public void setTransactionBo(TransactionBo transactionBo) {
		this.transactionBo = transactionBo;
	}



	@GET
	@Path("/save")
	public Response savePayment() {
 
		String result = transactionBo.save();
 
		return Response.status(200).entity(result).build();
 
	}
	
	@GET
	@Path("/load")
	public Response loadPayment() {
 
		String result = "Load payment method";
 
		return Response.status(200).entity(result).build();
 
	}
 
}